package com.hx.entity.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import lombok.Data;

/**
 * 
 * @TableName admin_user
 */
@TableName(value ="admin_user")
@Data
public class AdminUser implements Serializable {
    /**
     * 主键，管理员id（账号）
     */
    @TableId
    private Integer aId;

    /**
     * 密码
     */
    private String aPassword;

    /**
     * 姓名
     */
    private String aName;

    /**
     * 性别
     */
    private String aGender;

    /**
     * 证件号码
     */
    private String aCard;

    /**
     * 手机号
     */
    private String aPhone;

    /**
     * 邮箱
     */
    private String aEmail;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        AdminUser other = (AdminUser) that;
        return (this.getaId() == null ? other.getaId() == null : this.getaId().equals(other.getaId()))
            && (this.getaPassword() == null ? other.getaPassword() == null : this.getaPassword().equals(other.getaPassword()))
            && (this.getaName() == null ? other.getaName() == null : this.getaName().equals(other.getaName()))
            && (this.getaGender() == null ? other.getaGender() == null : this.getaGender().equals(other.getaGender()))
            && (this.getaCard() == null ? other.getaCard() == null : this.getaCard().equals(other.getaCard()))
            && (this.getaPhone() == null ? other.getaPhone() == null : this.getaPhone().equals(other.getaPhone()))
            && (this.getaEmail() == null ? other.getaEmail() == null : this.getaEmail().equals(other.getaEmail()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getaId() == null) ? 0 : getaId().hashCode());
        result = prime * result + ((getaPassword() == null) ? 0 : getaPassword().hashCode());
        result = prime * result + ((getaName() == null) ? 0 : getaName().hashCode());
        result = prime * result + ((getaGender() == null) ? 0 : getaGender().hashCode());
        result = prime * result + ((getaCard() == null) ? 0 : getaCard().hashCode());
        result = prime * result + ((getaPhone() == null) ? 0 : getaPhone().hashCode());
        result = prime * result + ((getaEmail() == null) ? 0 : getaEmail().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", aId=").append(aId);
        sb.append(", aPassword=").append(aPassword);
        sb.append(", aName=").append(aName);
        sb.append(", aGender=").append(aGender);
        sb.append(", aCard=").append(aCard);
        sb.append(", aPhone=").append(aPhone);
        sb.append(", aEmail=").append(aEmail);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}